import THREE from './three.js';

function Group(level){
    var group = new THREE.Group();
    level.on_create.push(function(){
        level.on_animate.push(function () {
            group.position.copy(level.camera.position);
            group.rotation.copy(level.camera.rotation);
        });
        level.scene.add(group);
    });
    return group;
}

function add(group, mesh){
    mesh.position.z = -100;
    group.add(mesh);
}

export default {Group, add};